/*
 * Copyright (c) 2008, 2016, OneAPM and/or its affiliates. All rights reserved.
 */
package me.yufan.chess;

import me.yufan.chess.utils.Initialization;
import org.newdawn.slick.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Title: SimpleGUI
 * Description: Slide2D 简单测试, Hello World
 *
 * @author Yufan
 * @version 1.0.0
 * @since 2016-01-26 18:13
 */
public class SimpleGUI extends BasicGame {

    private static final Logger LOGGER = LoggerFactory.getLogger(SimpleGUI.class);

    /**
     * Create a new basic game
     *
     * @param title The title for the game
     */
    public SimpleGUI(String title) {
        super(title);
    }

    @Override
    public void init(GameContainer container) throws SlickException {

    }

    @Override
    public void update(GameContainer container, int delta) throws SlickException {

    }

    @Override
    public void render(GameContainer container, Graphics g) throws SlickException {
        g.drawString("Howdy!", 100, 100);
    }

    public static void main(String[] args) {
        try {
            Initialization.init();
            AppGameContainer appgc;
            appgc = new AppGameContainer(new SimpleGUI("Simple Slick Game"));
            appgc.setDisplayMode(640, 480, false);
            appgc.start();
        } catch (SlickException ex) {
            LOGGER.info("", ex);
        }
    }
}
